//
//  HWGameYouXitanKuangCollectionViewCell.m
//  HWPromoteProjectAPP
//
//  Created by 陈道斌 on 2020/2/28.
//  Copyright © 2020 陈道斌. All rights reserved.
//

#import "HWGameYouXitanKuangCollectionViewCell.h"

@interface HWGameYouXitanKuangCollectionViewCell()
@property(strong,nonatomic) UIImageView *icoIamgeView;
@property(strong,nonatomic) UILabel  *youxilabel;



@end




@implementation HWGameYouXitanKuangCollectionViewCell


-(instancetype)initWithFrame:(CGRect)frame {
    
    if (self = [super initWithFrame:frame]) {
        
        [self setupUI];
        

        
    }
    
    
    return  self;
}



// 设置UI
- (void)setupUI {
    
    self.icoIamgeView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 44*CFLScaleValue, 44*CFLScaleValue)];
    self.icoIamgeView.backgroundColor = [UIColor whiteColor];
    self.icoIamgeView.layer.cornerRadius = 8;
    self.icoIamgeView.layer.masksToBounds = YES;
    [self.contentView addSubview: self.icoIamgeView];
    
    
    UILabel *selectLabel = [[UILabel alloc]initWithFrame:(CGRect)CGRectMake(-5,44*CFLScaleValue+6, 44*CFLScaleValue+10, 17)];
         selectLabel.font = [UIFont systemFontOfSize:10];
         selectLabel.textColor = RGB(68, 68, 68);
           selectLabel.text = @"游戏图标";
        selectLabel.textAlignment =  NSTextAlignmentCenter;
        self.youxilabel = selectLabel;
        [self  addSubview:selectLabel];
    
    
    
    
}

- (void)setDataModel:(HWdaichongzheKouModel *)dataModel {
    
    _dataModel = dataModel;
    
    [self.icoIamgeView sd_setImageWithURL:[NSURL URLWithString:dataModel.icon]  placeholderImage:nil];
    self.youxilabel.text = [NSString stringWithFormat:@"%@",dataModel.name];
    
    
    
    
}

@end
